<?php

/** @ingroup boleto
 *  @brief Classe contendo o formulario para gerar o boleto em PDF
 */
class Benservi_Forms_Boleto extends Zend_Form{

    public function init(){
        
        $banco = new Zend_Form_Element_Select('banco');
        $banco->setLabel('Banco')
              ->setRequired(true);

        $bancos = new Application_Model_DbTable_Banco();
        foreach ($bancos->fetchAll() as $bancosItens) {
            $banco->addMultiOption($bancosItens->codigo, $bancosItens->nome);
        }

        $banco->setDecorators(array(
                   'ViewHelper',
                  'Description',
                  array('Label', array('tag' => null)),
                  array('HtmlTag', array('tag' => 'p')),
           ));

        $submit = new Zend_Form_Element_Submit("submit");
        $submit->setLabel("Gerar");

        $submit->setDecorators(array(
                   'ViewHelper',
                  'Description',
           ));

        $submit->setAttrib('class', 'button-left');

        $this->addElements(array($banco));
    }

}

?>
